package org.springframework.sandbox.nettymvcext.nettymvc;

//import com.itjoin.pro_netty.annotation.Remote;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
//@Remote
public class NettyUserController {
    //此方法用于远程调用，需要加上Remote注解
    @RequestMapping(value="/getUserNameByIdext",method= RequestMethod.GET,produces = "text/html; charset=utf-8")
    //@Remote("getUserNameById")
    public @ResponseBody
    String getUserNameById(String userId){
        //此处并未访问数据库，只是做简单输出
        System.out.println("客户端请求的用户id为======"+userId);
        return "响应结果===用户张三"+userId;
    }
}